/*
 * Eugen Stoian <stoian.e@gmail.com> 2010
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef PROJECTVIEW_H
#define PROJECTVIEW_H

#include <QtGui/QWidget>

namespace Ui {
    class ProjectView;
}
class Project;
class Expression3D;
class Curve3D;
class Surface3D;
class ProjectView : public QWidget {
    Q_OBJECT
public:
    ProjectView(QWidget *parent = 0);
    ~ProjectView();
protected:
    void changeEvent(QEvent *e);
public slots:
    void setProject(Project* project);
    void update();
    void newExpression();
    void newCurve();
    void newSurface();
    void deleteCurrentObject();
    void onItemSelected();
signals:
    void expressionAdded(Expression3D* expr);
    void expressionDeleted(const QString& name);
    void surfaceAdded(Surface3D* surf);
    void surfaceDeleted(const QString& name);
    void curveAdded(Curve3D* curve);
    void curveDeleted(const QString& name);
    void plotSelected(const QString&);
    void expressionSelected(const QString&);
    void unselect();
private:
    Ui::ProjectView *m_ui;
    Project* _project;
};

#endif // PROJECTVIEW_H
